// 最后没用
let dv=document.getElementById('layerAttr');
let x=0;
let y=0;
let l=0;
let t=0;
let isDown=false;
dv.onmousedown=function (e) {
    x= e.clientX;
    y=e.clientY;
    l = dv.offsetLeft;
    t = dv.offsetTop;
    isDown = true;
    dv.style.cursor = 'move';
}
window.onmousemove = function (e) {
    if(isDown ===false){
        return ;

    }
    let nx = e.clientX;
    let ny = e.clientY;
    let nl = nx-(x-l);
    let nt = nt-(y-t);
    dv.style.left = nl+'px';
    dv.style.top =nt+'px';
}
dv.onmouseup = function () {
    isDown = false;
    dv.style.cursor = 'default';
}